package com.itheima.service;

import com.itheima.domain.Card;
import com.itheima.mapper.OneToOneMapper;
import com.itheima.utils.MapperUtils;

import java.util.List;

public class OneToOneServiceImpl implements OneToOneService {
    @Override
    public List<Card> selectAll() {
        try{
            OneToOneMapper oneToOneMapper = MapperUtils.getMapper(OneToOneMapper.class);
            List<Card> cards = oneToOneMapper.selectAll();
            return cards;
        }catch(Exception e){
            e.printStackTrace();
        }finally{
            MapperUtils.close();
        }
        return null;
    }
}
